﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace June_6_2021
{
    class Robot
    {
        public string RName { get; set; }

        public Robot() { }
        public Robot(string rname)
        {
            this.RName = rname;
        }

        public void ChooseRival()
        {
            Console.WriteLine("请选择对方角色<1：刘备 2：孙权 3：曹操>");
            int key = int.Parse(Console.ReadLine());

            switch (key)
            {
                case 1:
                    RName = "刘备";
                    break;
                case 2:
                    RName = "孙权";
                    break;
                case 3:
                    RName = "曹操";
                    break;
                default:
                    Console.WriteLine("暂未添加此角色，请输入【1，2，3】选择对手");
                    ChooseRival();
                    break;
            }

        }
    }
}
